package org.example.work2.at.order.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.example.work2.at.order.dto.Order;


/**
 * 顺序映射器
 *
 * @author xh
 * @date 2023/04/03
 */
@Mapper
public interface OrderMapper {

    /**
     * 插入订单记录
     *
     * @param order 订单
     * @return 影响记录数量
     */
    @Insert("INSERT INTO order_service.t_order (id, account_code, product_id, product_name, product_counts, total_price) VALUES (#{id}, #{accountCode}, #{productId}, #{productName}, #{productCounts}, #{totalPrice})")
    int saveOrder(Order order);

}
